﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ThirdParty_Compnies_List.aspx.cs"
    Inherits="ThirdParty_Compnies_List" MasterPageFile="~/MasterPage.master" %>

<%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>公司维护</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="7">
                    查询
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    代码:
                </td>
                <td>
                    <asp:TextBox ID="txtCode" runat="server" Width="130" />
                </td>
                <td class="tablefield">
                    名称:
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" Width="130" />
                </td>
                <td class="tablefield">
                    地址:
                </td>
                <td>
                    <asp:TextBox ID="txtAdd" runat="server" Width="130" />
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    联系人:
                </td>
                <td>
                    <asp:TextBox ID="txtContact" runat="server" Width="130"></asp:TextBox>
                </td>
                <td class="tablefield">
                    电话:
                </td>
                <td>
                    <asp:TextBox ID="txtTel" runat="server" Width="130"></asp:TextBox>
                </td>
                <td class="tablefield">
                    有效:
                </td>
                <td>
                    <asp:CheckBox ID="chkActive" Checked="true" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="6" style="text-align:right; padding-right:10px">
                    <asp:Button runat="server" Text="查询" CssClass="wsd_button2" ID="btnSrh" OnClick="btnSrh_Click" />
                    <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" />
                </td>
            </tr>
        </table>
        <br />
        <%--        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    系列列表
                </td>
                <td class="tabletitle">
                    <tup:gridviewtoolbarusercontrol id="GridViewToolbarUserControl1" runat="server" gridviewid="GridView1"
                        ongvtbsetcolumnsbuttonevent="GridViewToolbarUserControl1_OnGVTBSetColumnsButtonEvent" />
                </td>
            </tr>
        </table>--%>
        <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
            <ContentTemplate>
                <table id="wsd_listtable" width="100%">
                    <tr>
                        <td style="width: 100%">
                            <asp:GridView Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                                EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                                EnableEmptyContentRender="true" AllowPaging="True" PageSize="12" OnPageIndexChanging="GridView1_PageIndexChanging"
                                BorderWidth="0" EnableModelValidation="True">
                                <HeaderStyle CssClass="titlist" />
                                <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                                <Columns>
                                    <asp:HyperLinkField HeaderText="代码" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="ThirdParty_Compnies_Item.aspx?id={0}"
                                        DataTextField="CODE" ControlStyle-Font-Underline="false" ItemStyle-Width="10%">
                                        <ControlStyle Font-Underline="False"></ControlStyle>
                                    </asp:HyperLinkField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="left" HeaderText="公司名称" HeaderStyle-HorizontalAlign="center"
                                        ItemStyle-Width="25%">
                                        <ItemTemplate >
                                            <%# Eval("NAME") == null ? "" : (Eval("NAME").ToString().Length > 12 ? Eval("NAME").ToString().Substring(0, 12) + "..." : Eval("NAME").ToString())%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="left" HeaderText="地址" HeaderStyle-HorizontalAlign="center"
                                        ItemStyle-Width="25%">
                                        <ItemTemplate>
                                            <%# Eval("ADDRESS") == null ? "" : (Eval("ADDRESS").ToString().Length > 12 ? Eval("ADDRESS").ToString().Substring(0,12) + "..." : Eval("ADDRESS").ToString())%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="TEL" HeaderText="电话" ItemStyle-Width="10%" />
                                    <asp:BoundField DataField="MOBILE" HeaderText="手机" ItemStyle-Width="10%" />
                                    <asp:TemplateField ItemStyle-HorizontalAlign="left" HeaderText="联系人" HeaderStyle-HorizontalAlign="center"
                                        ItemStyle-Width="10%">
                                        <ItemTemplate>
                                            <%# Eval("CONTACT") == null ? "" : (Eval("CONTACT").ToString().Length > 4 ? Eval("CONTACT").ToString().Substring(0, 4) + "..." : Eval("CONTACT").ToString())%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="有效" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">
                                        <ItemTemplate>
                                            <b>
                                                <%# Eval("ACTIVE").ToString().ToUpper()=="TRUE" ? "<font size='3' color='green'>√</font>" : "<font size='3' color='red'>×</font>"%>
                                            </b>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:TemplateField>
                                    <asp:HyperLinkField Text="人员维护" DataNavigateUrlFields="ID"  DataNavigateUrlFormatString="../EmployeeData/ThirdPartyPersonList.aspx?{0}" />
                                </Columns>
                                <PagerSettings Visible="false" FirstPageText="首页" LastPageText="尾页" PageButtonCount="30" />
                                <RowStyle CssClass="evenline" />
                                <AlternatingRowStyle CssClass="oddline" />
                            </asp:GridView>
                            <uc1:GridPager ID="GridPager1" runat="server" Visible="false" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSrh" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <input id="btnAdd" type="button" class="wsd_button2" value="增  加" onclick="location.href='ThirdParty_Compnies_Item.aspx'" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
